//
//  MyStoryCell.m
//  TrueLove
//
//  Created by 刘康 on 15/1/28.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "MyStoryCell.h"

@implementation MyStoryCell

- (void)dealloc
{
    [_MyImageView release];
    [_userImageView release];
    [_userNameLabel release];
    [_UserTitleLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.MyImageView = [[UIImageView alloc] init];
        self.MyImageView.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:_MyImageView];
        [_MyImageView release];
        
        self.userImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_userImageView];
        [_userImageView release];
        
        self.userNameLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_userNameLabel];
        [_userNameLabel release];
        
        self.UserTitleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_UserTitleLabel];
        [_UserTitleLabel release];
        
    }
    
    
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    
    _MyImageView.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height * 4 / 5);
    _userImageView.frame = CGRectMake(5, self.contentView.frame.size.height * 4 / 5 + 5, self.contentView.frame.size.width / 6, self.contentView.frame.size.height / 5 - 10);
    _userNameLabel.frame = CGRectMake(self.contentView.frame.size.width / 6 + 10, self.contentView.frame.size.height * 4 / 5 + 5, self.contentView.frame.size.width * 4 / 5, self.contentView.frame.size.height / 15);
    _UserTitleLabel.frame = CGRectMake(self.contentView.frame.size.width / 6 + 10, self.contentView.frame.size.height * 4 / 5 + 5 + self.contentView.frame.size.height / 15 + 5, self.contentView.frame.size.width * 4 / 5, self.contentView.frame.size.height / 14);
    
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
